package com.app.base.service.core.organization.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @author yuhag
 * @since 2022-05-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="OrgOrganization对象", description="")
@TableName("org_organization")
public class Organization implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "部门名")
    private String organization;

    @ApiModelProperty(value = "关联上级id")
    private String did;

    @ApiModelProperty(value = "所属公司id")
    private String companyId;

    @ApiModelProperty(value = "部门负责人")
    private String leaderId;

    @ApiModelProperty(value = "0:部门 1:岗位 ")
    private Integer grade;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "修改时间")
    private Date updateTime;

    @ApiModelProperty(value = "创建人")
    private String createdBy;

    @ApiModelProperty(value = "修改人")
    private String modifyBy;

    @TableField(exist = false)
    private List<Organization> children;
}
